add_library(area SHARED area.cpp)
add_library(collimated SHARED collimated.cpp)
add_library(directional SHARED directional.cpp)
add_library(point SHARED point.cpp)
add_library(constant SHARED constant.cpp)
add_library(envmap SHARED envmap.cpp)
add_library(sky SHARED sky.cpp sunsky/skymodel.cpp sunsky/skymodel.h sunsky/skymodeldata.h sunsky/sunmodel.h)
add_library(sun SHARED sun.cpp)
add_library(sunsky SHARED sunsky.cpp)
add_library(spot SHARED spot.cpp)

target_link_libraries(area mitsuba-python)
target_link_libraries(collimated mitsuba-python)
target_link_libraries(directional mitsuba-python)
target_link_libraries(point mitsuba-python)
target_link_libraries(constant mitsuba-python)
target_link_libraries(envmap mitsuba-python)
target_link_libraries(sky mitsuba-python)
target_link_libraries(sun mitsuba-python)
target_link_libraries(sunsky mitsuba-python)
target_link_libraries(spot mitsuba-python)

set_target_properties(area PROPERTIES FOLDER "plugins")
set_target_properties(collimated PROPERTIES FOLDER "plugins")
set_target_properties(directional PROPERTIES FOLDER "plugins")
set_target_properties(point PROPERTIES FOLDER "plugins")
set_target_properties(constant PROPERTIES FOLDER "plugins")
set_target_properties(envmap PROPERTIES FOLDER "plugins")
set_target_properties(sky PROPERTIES FOLDER "plugins")
set_target_properties(sun PROPERTIES FOLDER "plugins")
set_target_properties(sunsky PROPERTIES FOLDER "plugins")
set_target_properties(spot PROPERTIES FOLDER "plugins")